home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / texmf.vim < prev    next >
Encoding:
Text File  |  2001-07-13  |  2.5 KB  |  88 lines

  1. " Vim syntax file
  2. " This is a GENERATED FILE. Please always refer to source file at the URI below.
  3. " Language: Web2C TeX texmf.cnf configuration file
  4. " Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
  5. " Last Change: 2001-05-13
  6. " URI: http://physics.muni.cz/~yeti/download/texmf.vim
  7.  
  8.  
  9. " Setup
  10. if version >= 600
  11.   if exists("b:current_syntax")
  12.     finish
  13.   endif
  14. else
  15.   syntax clear
  16. endif
  17.  
  18. syn case match
  19.  
  20. " Comments
  21. syn match texmfComment "%..\+$" contains=texmfTodo
  22. syn match texmfComment "%\s*$" contains=texmfTodo
  23. syn keyword texmfTodo TODO FIXME XXX NOT contained
  24.  
  25. " Constants and parameters
  26. syn match texmfPassedParameter "[-+]\=%\w\W"
  27. syn match texmfPassedParameter "[-+]\=%\w$"
  28. syn match texmfNumber "\<\d\+\>"
  29. syn match texmfVariable "\$\(\w\k*\|{\w\k*}\)"
  30. syn match texmfSpecial +\\"\|\\$+
  31. syn region texmfString start=+"+ end=+"+ skip=+\\"\\\\+ contains=texmfVariable,texmfSpecial,texmfPassedParameter
  32.  
  33. " Assignments
  34. syn match texmfLHSStart "^\s*\w\k*" nextgroup=texmfLHSDot,texmfEquals
  35. syn match texmfLHSVariable "\w\k*" contained nextgroup=texmfLHSDot,texmfEquals
  36. syn match texmfLHSDot "\." contained nextgroup=texmfLHSVariable
  37. syn match texmfEquals "\s*=" contained
  38.  
  39. " Specialities
  40. syn match texmfComma "," contained
  41. syn match texmfColons ":\|;"
  42. syn match texmfDoubleExclam "!!" contained
  43.  
  44. " Catch errors caused by wrong parenthesization
  45. syn region texmfBrace matchgroup=texmfBraceBrace start="{" end="}" contains=ALLBUT,texmfTodo,texmfBraceError,texmfLHSVariable,texmfLHSDot transparent
  46. syn match texmfBraceError "}"
  47.  
  48. " Define the default highlighting
  49. if version >= 508 || !exists("did_texmf_syntax_inits")
  50.   if version < 508
  51.     let did_texmf_syntax_inits = 1
  52.     command -nargs=+ HiLink hi link <args>
  53.   else
  54.     command -nargs=+ HiLink hi def link <args>
  55.   endif
  56.  
  57.   HiLink texmfComment         Comment
  58.   HiLink texmfTodo            Todo
  59.  
  60.   HiLink texmfPassedParameter texmfVariable
  61.   HiLink texmfVariable        Identifier
  62.  
  63.   HiLink texmfNumber          Number
  64.   HiLink texmfString          String
  65.  
  66.   HiLink texmfLHSStart        texmfLHS
  67.   HiLink texmfLHSVariable     texmfLHS
  68.   HiLink texmfLHSDot          texmfLHS
  69.   HiLink texmfLHS             Type
  70.  
  71.   HiLink texmfEquals          Normal
  72.  
  73.   HiLink texmfBraceBrace      texmfDelimiter
  74.   HiLink texmfComma           texmfDelimiter
  75.   HiLink texmfColons          texmfDelimiter
  76.   HiLink texmfDelimiter       Preproc
  77.  
  78.   HiLink texmfDoubleExclam    Statement
  79.   HiLink texmfSpecial         Special
  80.  
  81.   HiLink texmfBraceError      texmfError
  82.   HiLink texmfError           Error
  83.  
  84.   delcommand HiLink
  85. endif
  86.  
  87. let b:current_syntax = "texmf"
  88.